package com.zhentao.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


//@Component
public class Test1 {

    @Scheduled(cron = "0/1 * * * * ?")
    public void test1() {
        System.out.println("每一秒执行一次");
    }

    @Scheduled(cron = "0/5 * * * * ?")
    public void test2() {
        System.out.println("每五秒访问一次");
    }

}